﻿<?php 
//session_start();
if (!isset ($_SESSION["id"])) {
	session_destroy();
	echo "<script language='javascript'>top.location.href = 'Login.php';</script>";
	exit;
}
$User_index=$_SESSION["id"];
$sql="select sp.web_ui from GPS_SYS_PEOPLE sa, sys_permission sp where sa.ROLE_ID = sp.permission_index  and sa.user_id = $User_index";
$menuStr=$DBsql->fetch_one_array($sql);
$sql="select * from sys_web_ui swu where swu.web_ui_index in (".$menuStr['WEB_UI'].") and swu.web_ui_id=0 and swu.WEB_UI_VALID=1 order by swu.web_ui_index";
$menuOne=$DBsql->fetch_all_array($sql);
?>
	<div id="main-left-div">
      <div class="main-left-head">
        <ul>
          <li>欢迎您：<?php echo $_SESSION['name']?></li>
        </ul>
      </div>
      <div class="main-left-head-float"> <a href="#" class="bluelist1"></a> <a href="javascript:void(0)" class="bluelist2"></a> </div>
      <div class="nodeList">
        <div class="title" style="position:relative;">
          <span id="menuguide" style="position:absolute">
            中心位置：<a onmouseover="divSwitch(1)" onmouseout="divSwitch(0)" href="javascript:void(null)" style="display:inline-block; text-decoration:none" id="centerNow">河南省郑州市</a></span>
          </span>
          <div id="pmenu" onmouseover="divSwitch(1)" onmouseout="divSwitch(0)" style="display:none; position:absolute; top:20px; right:-1px; background:#F7FCFF; border:1px solid #0080C0; color:#666; padding:0px 5px; color:#999">河南省郑州市</div>
        </div>
        <ul class="nodeUL">
        	<?php foreach($menuOne as $menu){?>
		          <li id="<?php echo $menu['WEB_UI_METHOD']?>">
		            <span onclick="showDL('<?php echo $menu['WEB_UI_METHOD']?>')"><?php echo $menu['WEB_UI_NAME']?></span>
		            <dl>
		            <?php 
		            	//一级导航下的二级导航
		            	$sql="select * from sys_web_ui swu where swu.web_ui_id=".$menu['WEB_UI_INDEX']." and swu.web_ui_id!=0 and swu.web_ui_index in (".$menuStr['WEB_UI'].") and  swu.WEB_UI_VALID=1  order by swu.web_ui_index asc";
		            	//$sql="select * from sys_web_ui swu where swu.web_ui_id=".$menu['WEB_UI_INDEX']."and swu.web_ui_id!=0";
		            	$menuTwo=$DBsql->fetch_all_array($sql);
		            	foreach($menuTwo as $subMenu){
		            		if($menu['WEB_UI_NAME']!=='信息统计' && $menu['WEB_UI_NAME']!=='系统设置'){
		            ?>
		             			 <dd><a href="javascript:<?php echo $subMenu['WEB_UI_METHOD']?>()"><?php echo $subMenu['WEB_UI_NAME']?></a></dd>
		              <?php }else{?>
		              		<dd><a href="javascript:CreatFrame('<?php echo $subMenu['WEB_UI_METHOD']?>')"><?php echo $subMenu['WEB_UI_NAME']?></a></dd>
		              <?php }}?>
		            </dl>
		          </li>
          <?php }?>
        </ul>
      </div>
    </div>